package com.hege.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *
 * 获取配置文件中的自定义配置
 *
 *
 * @Author hege
 * @Date 2020/11/22 20:12
 * @Version 1.0
 */
@Controller
public class TestController {

    @Value("${test.name}")
    private String testName;

    @RequestMapping("/test")
    @ResponseBody
    public String test() {

        return "test" + testName;
    }
}
